import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        BinarySearchTree binarySearchTree = new BinarySearchTree();
        binarySearchTree.inset(12);
        binarySearchTree.inset(21);
        binarySearchTree.inset(5);
        binarySearchTree.inset(18);
        binarySearchTree.inset(9);

        binarySearchTree.inorder(binarySearchTree.root);
        System.out.println();
        BinarySearchTree.TreeNdoe ret = binarySearchTree.find(12);
        System.out.println(ret.val);


        System.out.println("==============");
        binarySearchTree.remove(18);
        binarySearchTree.inorder(binarySearchTree.root);
        System.out.println();
    }

}
